package some.talk.dao;

import java.util.List;
import java.util.Map;

import org.mybatis.spring.support.SqlSessionDaoSupport;
import org.springframework.stereotype.Component;

import some.talk.domain.TalkCommand;
@Component
public class TalkDaoImpl extends SqlSessionDaoSupport implements TalkDao{
	
	public void insertStalk(TalkCommand talkCommand){
		getSqlSession().insert("TalkDao.insertStalk",talkCommand);
	}
	public int getCount(Map<String,Object> ids){
		return (Integer)getSqlSession().selectOne("TalkDao.stalkCount",ids);
	}
	public List<TalkCommand> listStalk(Map<String,Object> map){
		List<TalkCommand> list = getSqlSession().selectList("TalkDao.selectList",map);
		return list;
	}
	@Override
	public void setStatus(Map<String, Object> ids) {
		getSqlSession().update("TalkDao.setStatus",ids);
	}
	@Override
	public void setP_id(Map<String, Object> map) {
		getSqlSession().update("TalkDao.setP_id", map);
	}
}
